/**
 * Copyright(C) 2008 Matthias Braunhofer
 * All rights reserved
 *
 * Created on: 28.07.2008
*/

package it.cums.wizards;

import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

public class SupplierAccountWizardPage extends WizardPage implements IWizardPage {
	private Text accountDetailsText;
	private Composite container;
	
	public SupplierAccountWizardPage() {
		super("New Supplier");
		setTitle("Account Details");
		setDescription("Enter account information");
	}

	@Override
	public void createControl(Composite parent) {
		container = new Composite(parent, SWT.NULL);
		GridLayout layout = new GridLayout();
		container.setLayout(layout);
		layout.numColumns = 2;
		Label label1 = new Label(container, SWT.NULL);
		label1.setText("Account information:");
		
		accountDetailsText = new Text(container, SWT.BORDER | SWT.MULTI);
		GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
		gd.verticalSpan = 2;
		accountDetailsText.setLayoutData(gd);
	
		setControl(container);
		setPageComplete(true);
	}
	
	public String getAccountDetails() {
		return accountDetailsText.getText().trim();
	}
	
	@Override
	public Control getControl() {
		return container;
	}
}
